package com.baitiaojun.moments.mapper;

import com.baitiaojun.api.domain.moments.UserMoments;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface UserMomentsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserMoments record);

    int insertSelective(UserMoments record);

    int selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserMoments record);

    int updateByPrimaryKey(UserMoments record);

    int deleteByContentId(Long contentId);

    UserMoments selectTypeById(Long id);

    UserMoments selectTypeByContentId(Long contentId);

    Long selectIdByContentId(Long contentId);

    List<UserMoments> batchSelectByUserId(@Param("followingUserIds") Set<Long> followingUserIds, @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize);

    UserMoments selectUserIdByContentId(Long contentId);

    UserMoments selectUserMomentsById(Long id);

    List<UserMoments> selectByUserId(@Param("userId") Long userId, @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize);

    Integer countMoments(Long userId);
}